package com.dykj.fireFighting.server.elasticsearch.device.repository;

import com.dykj.fireFighting.api.elasticsearch.device.entity.EsDevice;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * ES操作类
 * Created by macro on 2018/6/19.
 */
public interface EsDeviceRepository extends ElasticsearchRepository<EsDevice, Long> {

    /**
     * 搜索查询
     *
     * @param name
     * @param relationId
     * @param pageable
     * @return
     */
    Page<EsDevice> findByNameOrRelationId(String name, String relationId, Pageable pageable);

}
